package com.xjgzinfo.usdp.web.rest;

import com.xjgzinfo.usdp.AvueServer4jApp;
import com.xjgzinfo.usdp.config.TestSecurityConfiguration;
import com.xjgzinfo.usdp.domain.BladeVisualDb;
import com.xjgzinfo.usdp.repository.BladeVisualDbRepository;
import com.xjgzinfo.usdp.service.BladeVisualDbQueryService;
import com.xjgzinfo.usdp.service.BladeVisualDbService;
import com.xjgzinfo.usdp.service.dto.BladeVisualDbDTO;
import com.xjgzinfo.usdp.service.mapper.BladeVisualDbMapper;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.MediaType;
import org.springframework.security.test.context.support.WithMockUser;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.transaction.annotation.Transactional;

import javax.persistence.EntityManager;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
import java.util.List;

import static org.assertj.core.api.Assertions.assertThat;
import static org.hamcrest.Matchers.hasItem;
import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.csrf;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;

/**
 * Integration tests for the {@link BladeVisualDbResource} REST controller.
 */
@SpringBootTest(classes = {AvueServer4jApp.class, TestSecurityConfiguration.class})
@AutoConfigureMockMvc
@WithMockUser
public class BladeVisualDbResourceIT {

    private static final String DEFAULT_NAME = "AAAAAAAAAA";
    private static final String UPDATED_NAME = "BBBBBBBBBB";

    private static final Long DEFAULT_CREATE_DEPT = 20L;
    private static final Long UPDATED_CREATE_DEPT = 19L;
    private static final Long SMALLER_CREATE_DEPT = 20L - 1L;

    private static final String DEFAULT_PASSWORD = "AAAAAAAAAA";
    private static final String UPDATED_PASSWORD = "BBBBBBBBBB";

    private static final String DEFAULT_URL = "AAAAAAAAAA";
    private static final String UPDATED_URL = "BBBBBBBBBB";

    private static final String DEFAULT_DRIVER_CLASS = "AAAAAAAAAA";
    private static final String UPDATED_DRIVER_CLASS = "BBBBBBBBBB";

    private static final String DEFAULT_USERNAME = "AAAAAAAAAA";
    private static final String UPDATED_USERNAME = "BBBBBBBBBB";

    private static final Instant DEFAULT_CREATE_TIME = Instant.ofEpochMilli(0L);
    private static final Instant UPDATED_CREATE_TIME = Instant.now().truncatedTo(ChronoUnit.MILLIS);

    private static final String DEFAULT_REMARK = "AAAAAAAAAA";
    private static final String UPDATED_REMARK = "BBBBBBBBBB";

    private static final Long DEFAULT_UPDATE_USER = 20L;
    private static final Long UPDATED_UPDATE_USER = 19L;
    private static final Long SMALLER_UPDATE_USER = 20L - 1L;

    private static final Long DEFAULT_CREATE_USER = 20L;
    private static final Long UPDATED_CREATE_USER = 19L;
    private static final Long SMALLER_CREATE_USER = 20L - 1L;

    private static final Instant DEFAULT_UPDATE_TIME = Instant.ofEpochMilli(0L);
    private static final Instant UPDATED_UPDATE_TIME = Instant.now().truncatedTo(ChronoUnit.MILLIS);

    private static final Integer DEFAULT_STATUS = 10;
    private static final Integer UPDATED_STATUS = 9;
    private static final Integer SMALLER_STATUS = 10 - 1;

    private static final Integer DEFAULT_IS_DELETED = 10;
    private static final Integer UPDATED_IS_DELETED = 9;
    private static final Integer SMALLER_IS_DELETED = 10 - 1;

    @Autowired
    private BladeVisualDbRepository bladeVisualDbRepository;

    @Autowired
    private BladeVisualDbMapper bladeVisualDbMapper;

    @Autowired
    private BladeVisualDbService bladeVisualDbService;

    @Autowired
    private BladeVisualDbQueryService bladeVisualDbQueryService;

    @Autowired
    private EntityManager em;

    @Autowired
    private MockMvc restBladeVisualDbMockMvc;

    private BladeVisualDb bladeVisualDb;

    /**
     * Create an entity for this test.
     * <p>
     * This is a static method, as tests for other entities might also need it,
     * if they test an entity which requires the current entity.
     */
    public static BladeVisualDb createEntity(EntityManager em) {
        BladeVisualDb bladeVisualDb = new BladeVisualDb()
                .name(DEFAULT_NAME)
                .createDept(DEFAULT_CREATE_DEPT)
                .password(DEFAULT_PASSWORD)
                .url(DEFAULT_URL)
                .driverClass(DEFAULT_DRIVER_CLASS)
                .username(DEFAULT_USERNAME)
                .createTime(DEFAULT_CREATE_TIME)
                .remark(DEFAULT_REMARK)
                .updateUser(DEFAULT_UPDATE_USER)
                .createUser(DEFAULT_CREATE_USER)
                .updateTime(DEFAULT_UPDATE_TIME)
                .status(DEFAULT_STATUS)
                .isDeleted(DEFAULT_IS_DELETED);
        return bladeVisualDb;
    }

    /**
     * Create an updated entity for this test.
     * <p>
     * This is a static method, as tests for other entities might also need it,
     * if they test an entity which requires the current entity.
     */
    public static BladeVisualDb createUpdatedEntity(EntityManager em) {
        BladeVisualDb bladeVisualDb = new BladeVisualDb()
                .name(UPDATED_NAME)
                .createDept(UPDATED_CREATE_DEPT)
                .password(UPDATED_PASSWORD)
                .url(UPDATED_URL)
                .driverClass(UPDATED_DRIVER_CLASS)
                .username(UPDATED_USERNAME)
                .createTime(UPDATED_CREATE_TIME)
                .remark(UPDATED_REMARK)
                .updateUser(UPDATED_UPDATE_USER)
                .createUser(UPDATED_CREATE_USER)
                .updateTime(UPDATED_UPDATE_TIME)
                .status(UPDATED_STATUS)
                .isDeleted(UPDATED_IS_DELETED);
        return bladeVisualDb;
    }

    @BeforeEach
    public void initTest() {
        bladeVisualDb = createEntity(em);
    }

    @Test
    @Transactional
    public void createBladeVisualDb() throws Exception {
        int databaseSizeBeforeCreate = bladeVisualDbRepository.findAll().size();
        // Create the BladeVisualDb
        BladeVisualDbDTO bladeVisualDbDTO = bladeVisualDbMapper.toDto(bladeVisualDb);
        restBladeVisualDbMockMvc.perform(post("/api/blade-visual-dbs").with(csrf())
                .contentType(MediaType.APPLICATION_JSON)
                .content(TestUtil.convertObjectToJsonBytes(bladeVisualDbDTO)))
                .andExpect(status().isCreated());

        // Validate the BladeVisualDb in the database
        List<BladeVisualDb> bladeVisualDbList = bladeVisualDbRepository.findAll();
        assertThat(bladeVisualDbList).hasSize(databaseSizeBeforeCreate + 1);
        BladeVisualDb testBladeVisualDb = bladeVisualDbList.get(bladeVisualDbList.size() - 1);
        assertThat(testBladeVisualDb.getName()).isEqualTo(DEFAULT_NAME);
        assertThat(testBladeVisualDb.getCreateDept()).isEqualTo(DEFAULT_CREATE_DEPT);
        assertThat(testBladeVisualDb.getPassword()).isEqualTo(DEFAULT_PASSWORD);
        assertThat(testBladeVisualDb.getUrl()).isEqualTo(DEFAULT_URL);
        assertThat(testBladeVisualDb.getDriverClass()).isEqualTo(DEFAULT_DRIVER_CLASS);
        assertThat(testBladeVisualDb.getUsername()).isEqualTo(DEFAULT_USERNAME);
        assertThat(testBladeVisualDb.getCreateTime()).isEqualTo(DEFAULT_CREATE_TIME);
        assertThat(testBladeVisualDb.getRemark()).isEqualTo(DEFAULT_REMARK);
        assertThat(testBladeVisualDb.getUpdateUser()).isEqualTo(DEFAULT_UPDATE_USER);
        assertThat(testBladeVisualDb.getCreateUser()).isEqualTo(DEFAULT_CREATE_USER);
        assertThat(testBladeVisualDb.getUpdateTime()).isEqualTo(DEFAULT_UPDATE_TIME);
        assertThat(testBladeVisualDb.getStatus()).isEqualTo(DEFAULT_STATUS);
        assertThat(testBladeVisualDb.getIsDeleted()).isEqualTo(DEFAULT_IS_DELETED);
    }

    @Test
    @Transactional
    public void createBladeVisualDbWithExistingId() throws Exception {
        int databaseSizeBeforeCreate = bladeVisualDbRepository.findAll().size();

        // Create the BladeVisualDb with an existing ID
        bladeVisualDb.setId(1L);
        BladeVisualDbDTO bladeVisualDbDTO = bladeVisualDbMapper.toDto(bladeVisualDb);

        // An entity with an existing ID cannot be created, so this API call must fail
        restBladeVisualDbMockMvc.perform(post("/api/blade-visual-dbs").with(csrf())
                .contentType(MediaType.APPLICATION_JSON)
                .content(TestUtil.convertObjectToJsonBytes(bladeVisualDbDTO)))
                .andExpect(status().isBadRequest());

        // Validate the BladeVisualDb in the database
        List<BladeVisualDb> bladeVisualDbList = bladeVisualDbRepository.findAll();
        assertThat(bladeVisualDbList).hasSize(databaseSizeBeforeCreate);
    }


    @Test
    @Transactional
    public void getAllBladeVisualDbs() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList
        restBladeVisualDbMockMvc.perform(get("/api/blade-visual-dbs?sort=id,desc"))
                .andExpect(status().isOk())
                .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))
                .andExpect(jsonPath("$.[*].id").value(hasItem(bladeVisualDb.getId().intValue())))
                .andExpect(jsonPath("$.[*].name").value(hasItem(DEFAULT_NAME)))
                .andExpect(jsonPath("$.[*].createDept").value(hasItem(DEFAULT_CREATE_DEPT.intValue())))
                .andExpect(jsonPath("$.[*].password").value(hasItem(DEFAULT_PASSWORD)))
                .andExpect(jsonPath("$.[*].url").value(hasItem(DEFAULT_URL)))
                .andExpect(jsonPath("$.[*].driverClass").value(hasItem(DEFAULT_DRIVER_CLASS)))
                .andExpect(jsonPath("$.[*].username").value(hasItem(DEFAULT_USERNAME)))
                .andExpect(jsonPath("$.[*].createTime").value(hasItem(DEFAULT_CREATE_TIME.toString())))
                .andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK)))
                .andExpect(jsonPath("$.[*].updateUser").value(hasItem(DEFAULT_UPDATE_USER.intValue())))
                .andExpect(jsonPath("$.[*].createUser").value(hasItem(DEFAULT_CREATE_USER.intValue())))
                .andExpect(jsonPath("$.[*].updateTime").value(hasItem(DEFAULT_UPDATE_TIME.toString())))
                .andExpect(jsonPath("$.[*].status").value(hasItem(DEFAULT_STATUS)))
                .andExpect(jsonPath("$.[*].isDeleted").value(hasItem(DEFAULT_IS_DELETED)));
    }

    @Test
    @Transactional
    public void getBladeVisualDb() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get the bladeVisualDb
        restBladeVisualDbMockMvc.perform(get("/api/blade-visual-dbs/{id}", bladeVisualDb.getId()))
                .andExpect(status().isOk())
                .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))
                .andExpect(jsonPath("$.id").value(bladeVisualDb.getId().intValue()))
                .andExpect(jsonPath("$.name").value(DEFAULT_NAME))
                .andExpect(jsonPath("$.createDept").value(DEFAULT_CREATE_DEPT.intValue()))
                .andExpect(jsonPath("$.password").value(DEFAULT_PASSWORD))
                .andExpect(jsonPath("$.url").value(DEFAULT_URL))
                .andExpect(jsonPath("$.driverClass").value(DEFAULT_DRIVER_CLASS))
                .andExpect(jsonPath("$.username").value(DEFAULT_USERNAME))
                .andExpect(jsonPath("$.createTime").value(DEFAULT_CREATE_TIME.toString()))
                .andExpect(jsonPath("$.remark").value(DEFAULT_REMARK))
                .andExpect(jsonPath("$.updateUser").value(DEFAULT_UPDATE_USER.intValue()))
                .andExpect(jsonPath("$.createUser").value(DEFAULT_CREATE_USER.intValue()))
                .andExpect(jsonPath("$.updateTime").value(DEFAULT_UPDATE_TIME.toString()))
                .andExpect(jsonPath("$.status").value(DEFAULT_STATUS))
                .andExpect(jsonPath("$.isDeleted").value(DEFAULT_IS_DELETED));
    }


    @Test
    @Transactional
    public void getBladeVisualDbsByIdFiltering() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        Long id = bladeVisualDb.getId();

        defaultBladeVisualDbShouldBeFound("id.equals=" + id);
        defaultBladeVisualDbShouldNotBeFound("id.notEquals=" + id);

        defaultBladeVisualDbShouldBeFound("id.greaterThanOrEqual=" + id);
        defaultBladeVisualDbShouldNotBeFound("id.greaterThan=" + id);

        defaultBladeVisualDbShouldBeFound("id.lessThanOrEqual=" + id);
        defaultBladeVisualDbShouldNotBeFound("id.lessThan=" + id);
    }


    @Test
    @Transactional
    public void getAllBladeVisualDbsByNameIsEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where name equals to DEFAULT_NAME
        defaultBladeVisualDbShouldBeFound("name.equals=" + DEFAULT_NAME);

        // Get all the bladeVisualDbList where name equals to UPDATED_NAME
        defaultBladeVisualDbShouldNotBeFound("name.equals=" + UPDATED_NAME);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByNameIsNotEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where name not equals to DEFAULT_NAME
        defaultBladeVisualDbShouldNotBeFound("name.notEquals=" + DEFAULT_NAME);

        // Get all the bladeVisualDbList where name not equals to UPDATED_NAME
        defaultBladeVisualDbShouldBeFound("name.notEquals=" + UPDATED_NAME);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByNameIsInShouldWork() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where name in DEFAULT_NAME or UPDATED_NAME
        defaultBladeVisualDbShouldBeFound("name.in=" + DEFAULT_NAME + "," + UPDATED_NAME);

        // Get all the bladeVisualDbList where name equals to UPDATED_NAME
        defaultBladeVisualDbShouldNotBeFound("name.in=" + UPDATED_NAME);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByNameIsNullOrNotNull() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where name is not null
        defaultBladeVisualDbShouldBeFound("name.specified=true");

        // Get all the bladeVisualDbList where name is null
        defaultBladeVisualDbShouldNotBeFound("name.specified=false");
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByNameContainsSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where name contains DEFAULT_NAME
        defaultBladeVisualDbShouldBeFound("name.contains=" + DEFAULT_NAME);

        // Get all the bladeVisualDbList where name contains UPDATED_NAME
        defaultBladeVisualDbShouldNotBeFound("name.contains=" + UPDATED_NAME);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByNameNotContainsSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where name does not contain DEFAULT_NAME
        defaultBladeVisualDbShouldNotBeFound("name.doesNotContain=" + DEFAULT_NAME);

        // Get all the bladeVisualDbList where name does not contain UPDATED_NAME
        defaultBladeVisualDbShouldBeFound("name.doesNotContain=" + UPDATED_NAME);
    }


    @Test
    @Transactional
    public void getAllBladeVisualDbsByCreateDeptIsEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where createDept equals to DEFAULT_CREATE_DEPT
        defaultBladeVisualDbShouldBeFound("createDept.equals=" + DEFAULT_CREATE_DEPT);

        // Get all the bladeVisualDbList where createDept equals to UPDATED_CREATE_DEPT
        defaultBladeVisualDbShouldNotBeFound("createDept.equals=" + UPDATED_CREATE_DEPT);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByCreateDeptIsNotEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where createDept not equals to DEFAULT_CREATE_DEPT
        defaultBladeVisualDbShouldNotBeFound("createDept.notEquals=" + DEFAULT_CREATE_DEPT);

        // Get all the bladeVisualDbList where createDept not equals to UPDATED_CREATE_DEPT
        defaultBladeVisualDbShouldBeFound("createDept.notEquals=" + UPDATED_CREATE_DEPT);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByCreateDeptIsInShouldWork() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where createDept in DEFAULT_CREATE_DEPT or UPDATED_CREATE_DEPT
        defaultBladeVisualDbShouldBeFound("createDept.in=" + DEFAULT_CREATE_DEPT + "," + UPDATED_CREATE_DEPT);

        // Get all the bladeVisualDbList where createDept equals to UPDATED_CREATE_DEPT
        defaultBladeVisualDbShouldNotBeFound("createDept.in=" + UPDATED_CREATE_DEPT);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByCreateDeptIsNullOrNotNull() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where createDept is not null
        defaultBladeVisualDbShouldBeFound("createDept.specified=true");

        // Get all the bladeVisualDbList where createDept is null
        defaultBladeVisualDbShouldNotBeFound("createDept.specified=false");
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByCreateDeptIsGreaterThanOrEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where createDept is greater than or equal to DEFAULT_CREATE_DEPT
        defaultBladeVisualDbShouldBeFound("createDept.greaterThanOrEqual=" + DEFAULT_CREATE_DEPT);

        // Get all the bladeVisualDbList where createDept is greater than or equal to (DEFAULT_CREATE_DEPT + 1)
        defaultBladeVisualDbShouldNotBeFound("createDept.greaterThanOrEqual=" + (DEFAULT_CREATE_DEPT + 1));
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByCreateDeptIsLessThanOrEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where createDept is less than or equal to DEFAULT_CREATE_DEPT
        defaultBladeVisualDbShouldBeFound("createDept.lessThanOrEqual=" + DEFAULT_CREATE_DEPT);

        // Get all the bladeVisualDbList where createDept is less than or equal to SMALLER_CREATE_DEPT
        defaultBladeVisualDbShouldNotBeFound("createDept.lessThanOrEqual=" + SMALLER_CREATE_DEPT);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByCreateDeptIsLessThanSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where createDept is less than DEFAULT_CREATE_DEPT
        defaultBladeVisualDbShouldNotBeFound("createDept.lessThan=" + DEFAULT_CREATE_DEPT);

        // Get all the bladeVisualDbList where createDept is less than (DEFAULT_CREATE_DEPT + 1)
        defaultBladeVisualDbShouldBeFound("createDept.lessThan=" + (DEFAULT_CREATE_DEPT + 1));
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByCreateDeptIsGreaterThanSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where createDept is greater than DEFAULT_CREATE_DEPT
        defaultBladeVisualDbShouldNotBeFound("createDept.greaterThan=" + DEFAULT_CREATE_DEPT);

        // Get all the bladeVisualDbList where createDept is greater than SMALLER_CREATE_DEPT
        defaultBladeVisualDbShouldBeFound("createDept.greaterThan=" + SMALLER_CREATE_DEPT);
    }


    @Test
    @Transactional
    public void getAllBladeVisualDbsByPasswordIsEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where password equals to DEFAULT_PASSWORD
        defaultBladeVisualDbShouldBeFound("password.equals=" + DEFAULT_PASSWORD);

        // Get all the bladeVisualDbList where password equals to UPDATED_PASSWORD
        defaultBladeVisualDbShouldNotBeFound("password.equals=" + UPDATED_PASSWORD);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByPasswordIsNotEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where password not equals to DEFAULT_PASSWORD
        defaultBladeVisualDbShouldNotBeFound("password.notEquals=" + DEFAULT_PASSWORD);

        // Get all the bladeVisualDbList where password not equals to UPDATED_PASSWORD
        defaultBladeVisualDbShouldBeFound("password.notEquals=" + UPDATED_PASSWORD);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByPasswordIsInShouldWork() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where password in DEFAULT_PASSWORD or UPDATED_PASSWORD
        defaultBladeVisualDbShouldBeFound("password.in=" + DEFAULT_PASSWORD + "," + UPDATED_PASSWORD);

        // Get all the bladeVisualDbList where password equals to UPDATED_PASSWORD
        defaultBladeVisualDbShouldNotBeFound("password.in=" + UPDATED_PASSWORD);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByPasswordIsNullOrNotNull() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where password is not null
        defaultBladeVisualDbShouldBeFound("password.specified=true");

        // Get all the bladeVisualDbList where password is null
        defaultBladeVisualDbShouldNotBeFound("password.specified=false");
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByPasswordContainsSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where password contains DEFAULT_PASSWORD
        defaultBladeVisualDbShouldBeFound("password.contains=" + DEFAULT_PASSWORD);

        // Get all the bladeVisualDbList where password contains UPDATED_PASSWORD
        defaultBladeVisualDbShouldNotBeFound("password.contains=" + UPDATED_PASSWORD);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByPasswordNotContainsSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where password does not contain DEFAULT_PASSWORD
        defaultBladeVisualDbShouldNotBeFound("password.doesNotContain=" + DEFAULT_PASSWORD);

        // Get all the bladeVisualDbList where password does not contain UPDATED_PASSWORD
        defaultBladeVisualDbShouldBeFound("password.doesNotContain=" + UPDATED_PASSWORD);
    }


    @Test
    @Transactional
    public void getAllBladeVisualDbsByUrlIsEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where url equals to DEFAULT_URL
        defaultBladeVisualDbShouldBeFound("url.equals=" + DEFAULT_URL);

        // Get all the bladeVisualDbList where url equals to UPDATED_URL
        defaultBladeVisualDbShouldNotBeFound("url.equals=" + UPDATED_URL);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByUrlIsNotEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where url not equals to DEFAULT_URL
        defaultBladeVisualDbShouldNotBeFound("url.notEquals=" + DEFAULT_URL);

        // Get all the bladeVisualDbList where url not equals to UPDATED_URL
        defaultBladeVisualDbShouldBeFound("url.notEquals=" + UPDATED_URL);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByUrlIsInShouldWork() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where url in DEFAULT_URL or UPDATED_URL
        defaultBladeVisualDbShouldBeFound("url.in=" + DEFAULT_URL + "," + UPDATED_URL);

        // Get all the bladeVisualDbList where url equals to UPDATED_URL
        defaultBladeVisualDbShouldNotBeFound("url.in=" + UPDATED_URL);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByUrlIsNullOrNotNull() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where url is not null
        defaultBladeVisualDbShouldBeFound("url.specified=true");

        // Get all the bladeVisualDbList where url is null
        defaultBladeVisualDbShouldNotBeFound("url.specified=false");
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByUrlContainsSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where url contains DEFAULT_URL
        defaultBladeVisualDbShouldBeFound("url.contains=" + DEFAULT_URL);

        // Get all the bladeVisualDbList where url contains UPDATED_URL
        defaultBladeVisualDbShouldNotBeFound("url.contains=" + UPDATED_URL);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByUrlNotContainsSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where url does not contain DEFAULT_URL
        defaultBladeVisualDbShouldNotBeFound("url.doesNotContain=" + DEFAULT_URL);

        // Get all the bladeVisualDbList where url does not contain UPDATED_URL
        defaultBladeVisualDbShouldBeFound("url.doesNotContain=" + UPDATED_URL);
    }


    @Test
    @Transactional
    public void getAllBladeVisualDbsByDriverClassIsEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where driverClass equals to DEFAULT_DRIVER_CLASS
        defaultBladeVisualDbShouldBeFound("driverClass.equals=" + DEFAULT_DRIVER_CLASS);

        // Get all the bladeVisualDbList where driverClass equals to UPDATED_DRIVER_CLASS
        defaultBladeVisualDbShouldNotBeFound("driverClass.equals=" + UPDATED_DRIVER_CLASS);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByDriverClassIsNotEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where driverClass not equals to DEFAULT_DRIVER_CLASS
        defaultBladeVisualDbShouldNotBeFound("driverClass.notEquals=" + DEFAULT_DRIVER_CLASS);

        // Get all the bladeVisualDbList where driverClass not equals to UPDATED_DRIVER_CLASS
        defaultBladeVisualDbShouldBeFound("driverClass.notEquals=" + UPDATED_DRIVER_CLASS);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByDriverClassIsInShouldWork() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where driverClass in DEFAULT_DRIVER_CLASS or UPDATED_DRIVER_CLASS
        defaultBladeVisualDbShouldBeFound("driverClass.in=" + DEFAULT_DRIVER_CLASS + "," + UPDATED_DRIVER_CLASS);

        // Get all the bladeVisualDbList where driverClass equals to UPDATED_DRIVER_CLASS
        defaultBladeVisualDbShouldNotBeFound("driverClass.in=" + UPDATED_DRIVER_CLASS);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByDriverClassIsNullOrNotNull() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where driverClass is not null
        defaultBladeVisualDbShouldBeFound("driverClass.specified=true");

        // Get all the bladeVisualDbList where driverClass is null
        defaultBladeVisualDbShouldNotBeFound("driverClass.specified=false");
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByDriverClassContainsSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where driverClass contains DEFAULT_DRIVER_CLASS
        defaultBladeVisualDbShouldBeFound("driverClass.contains=" + DEFAULT_DRIVER_CLASS);

        // Get all the bladeVisualDbList where driverClass contains UPDATED_DRIVER_CLASS
        defaultBladeVisualDbShouldNotBeFound("driverClass.contains=" + UPDATED_DRIVER_CLASS);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByDriverClassNotContainsSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where driverClass does not contain DEFAULT_DRIVER_CLASS
        defaultBladeVisualDbShouldNotBeFound("driverClass.doesNotContain=" + DEFAULT_DRIVER_CLASS);

        // Get all the bladeVisualDbList where driverClass does not contain UPDATED_DRIVER_CLASS
        defaultBladeVisualDbShouldBeFound("driverClass.doesNotContain=" + UPDATED_DRIVER_CLASS);
    }


    @Test
    @Transactional
    public void getAllBladeVisualDbsByUsernameIsEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where username equals to DEFAULT_USERNAME
        defaultBladeVisualDbShouldBeFound("username.equals=" + DEFAULT_USERNAME);

        // Get all the bladeVisualDbList where username equals to UPDATED_USERNAME
        defaultBladeVisualDbShouldNotBeFound("username.equals=" + UPDATED_USERNAME);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByUsernameIsNotEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where username not equals to DEFAULT_USERNAME
        defaultBladeVisualDbShouldNotBeFound("username.notEquals=" + DEFAULT_USERNAME);

        // Get all the bladeVisualDbList where username not equals to UPDATED_USERNAME
        defaultBladeVisualDbShouldBeFound("username.notEquals=" + UPDATED_USERNAME);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByUsernameIsInShouldWork() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where username in DEFAULT_USERNAME or UPDATED_USERNAME
        defaultBladeVisualDbShouldBeFound("username.in=" + DEFAULT_USERNAME + "," + UPDATED_USERNAME);

        // Get all the bladeVisualDbList where username equals to UPDATED_USERNAME
        defaultBladeVisualDbShouldNotBeFound("username.in=" + UPDATED_USERNAME);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByUsernameIsNullOrNotNull() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where username is not null
        defaultBladeVisualDbShouldBeFound("username.specified=true");

        // Get all the bladeVisualDbList where username is null
        defaultBladeVisualDbShouldNotBeFound("username.specified=false");
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByUsernameContainsSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where username contains DEFAULT_USERNAME
        defaultBladeVisualDbShouldBeFound("username.contains=" + DEFAULT_USERNAME);

        // Get all the bladeVisualDbList where username contains UPDATED_USERNAME
        defaultBladeVisualDbShouldNotBeFound("username.contains=" + UPDATED_USERNAME);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByUsernameNotContainsSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where username does not contain DEFAULT_USERNAME
        defaultBladeVisualDbShouldNotBeFound("username.doesNotContain=" + DEFAULT_USERNAME);

        // Get all the bladeVisualDbList where username does not contain UPDATED_USERNAME
        defaultBladeVisualDbShouldBeFound("username.doesNotContain=" + UPDATED_USERNAME);
    }


    @Test
    @Transactional
    public void getAllBladeVisualDbsByCreateTimeIsEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where createTime equals to DEFAULT_CREATE_TIME
        defaultBladeVisualDbShouldBeFound("createTime.equals=" + DEFAULT_CREATE_TIME);

        // Get all the bladeVisualDbList where createTime equals to UPDATED_CREATE_TIME
        defaultBladeVisualDbShouldNotBeFound("createTime.equals=" + UPDATED_CREATE_TIME);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByCreateTimeIsNotEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where createTime not equals to DEFAULT_CREATE_TIME
        defaultBladeVisualDbShouldNotBeFound("createTime.notEquals=" + DEFAULT_CREATE_TIME);

        // Get all the bladeVisualDbList where createTime not equals to UPDATED_CREATE_TIME
        defaultBladeVisualDbShouldBeFound("createTime.notEquals=" + UPDATED_CREATE_TIME);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByCreateTimeIsInShouldWork() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where createTime in DEFAULT_CREATE_TIME or UPDATED_CREATE_TIME
        defaultBladeVisualDbShouldBeFound("createTime.in=" + DEFAULT_CREATE_TIME + "," + UPDATED_CREATE_TIME);

        // Get all the bladeVisualDbList where createTime equals to UPDATED_CREATE_TIME
        defaultBladeVisualDbShouldNotBeFound("createTime.in=" + UPDATED_CREATE_TIME);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByCreateTimeIsNullOrNotNull() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where createTime is not null
        defaultBladeVisualDbShouldBeFound("createTime.specified=true");

        // Get all the bladeVisualDbList where createTime is null
        defaultBladeVisualDbShouldNotBeFound("createTime.specified=false");
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByRemarkIsEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where remark equals to DEFAULT_REMARK
        defaultBladeVisualDbShouldBeFound("remark.equals=" + DEFAULT_REMARK);

        // Get all the bladeVisualDbList where remark equals to UPDATED_REMARK
        defaultBladeVisualDbShouldNotBeFound("remark.equals=" + UPDATED_REMARK);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByRemarkIsNotEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where remark not equals to DEFAULT_REMARK
        defaultBladeVisualDbShouldNotBeFound("remark.notEquals=" + DEFAULT_REMARK);

        // Get all the bladeVisualDbList where remark not equals to UPDATED_REMARK
        defaultBladeVisualDbShouldBeFound("remark.notEquals=" + UPDATED_REMARK);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByRemarkIsInShouldWork() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where remark in DEFAULT_REMARK or UPDATED_REMARK
        defaultBladeVisualDbShouldBeFound("remark.in=" + DEFAULT_REMARK + "," + UPDATED_REMARK);

        // Get all the bladeVisualDbList where remark equals to UPDATED_REMARK
        defaultBladeVisualDbShouldNotBeFound("remark.in=" + UPDATED_REMARK);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByRemarkIsNullOrNotNull() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where remark is not null
        defaultBladeVisualDbShouldBeFound("remark.specified=true");

        // Get all the bladeVisualDbList where remark is null
        defaultBladeVisualDbShouldNotBeFound("remark.specified=false");
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByRemarkContainsSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where remark contains DEFAULT_REMARK
        defaultBladeVisualDbShouldBeFound("remark.contains=" + DEFAULT_REMARK);

        // Get all the bladeVisualDbList where remark contains UPDATED_REMARK
        defaultBladeVisualDbShouldNotBeFound("remark.contains=" + UPDATED_REMARK);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByRemarkNotContainsSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where remark does not contain DEFAULT_REMARK
        defaultBladeVisualDbShouldNotBeFound("remark.doesNotContain=" + DEFAULT_REMARK);

        // Get all the bladeVisualDbList where remark does not contain UPDATED_REMARK
        defaultBladeVisualDbShouldBeFound("remark.doesNotContain=" + UPDATED_REMARK);
    }


    @Test
    @Transactional
    public void getAllBladeVisualDbsByUpdateUserIsEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where updateUser equals to DEFAULT_UPDATE_USER
        defaultBladeVisualDbShouldBeFound("updateUser.equals=" + DEFAULT_UPDATE_USER);

        // Get all the bladeVisualDbList where updateUser equals to UPDATED_UPDATE_USER
        defaultBladeVisualDbShouldNotBeFound("updateUser.equals=" + UPDATED_UPDATE_USER);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByUpdateUserIsNotEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where updateUser not equals to DEFAULT_UPDATE_USER
        defaultBladeVisualDbShouldNotBeFound("updateUser.notEquals=" + DEFAULT_UPDATE_USER);

        // Get all the bladeVisualDbList where updateUser not equals to UPDATED_UPDATE_USER
        defaultBladeVisualDbShouldBeFound("updateUser.notEquals=" + UPDATED_UPDATE_USER);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByUpdateUserIsInShouldWork() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where updateUser in DEFAULT_UPDATE_USER or UPDATED_UPDATE_USER
        defaultBladeVisualDbShouldBeFound("updateUser.in=" + DEFAULT_UPDATE_USER + "," + UPDATED_UPDATE_USER);

        // Get all the bladeVisualDbList where updateUser equals to UPDATED_UPDATE_USER
        defaultBladeVisualDbShouldNotBeFound("updateUser.in=" + UPDATED_UPDATE_USER);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByUpdateUserIsNullOrNotNull() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where updateUser is not null
        defaultBladeVisualDbShouldBeFound("updateUser.specified=true");

        // Get all the bladeVisualDbList where updateUser is null
        defaultBladeVisualDbShouldNotBeFound("updateUser.specified=false");
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByUpdateUserIsGreaterThanOrEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where updateUser is greater than or equal to DEFAULT_UPDATE_USER
        defaultBladeVisualDbShouldBeFound("updateUser.greaterThanOrEqual=" + DEFAULT_UPDATE_USER);

        // Get all the bladeVisualDbList where updateUser is greater than or equal to (DEFAULT_UPDATE_USER + 1)
        defaultBladeVisualDbShouldNotBeFound("updateUser.greaterThanOrEqual=" + (DEFAULT_UPDATE_USER + 1));
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByUpdateUserIsLessThanOrEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where updateUser is less than or equal to DEFAULT_UPDATE_USER
        defaultBladeVisualDbShouldBeFound("updateUser.lessThanOrEqual=" + DEFAULT_UPDATE_USER);

        // Get all the bladeVisualDbList where updateUser is less than or equal to SMALLER_UPDATE_USER
        defaultBladeVisualDbShouldNotBeFound("updateUser.lessThanOrEqual=" + SMALLER_UPDATE_USER);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByUpdateUserIsLessThanSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where updateUser is less than DEFAULT_UPDATE_USER
        defaultBladeVisualDbShouldNotBeFound("updateUser.lessThan=" + DEFAULT_UPDATE_USER);

        // Get all the bladeVisualDbList where updateUser is less than (DEFAULT_UPDATE_USER + 1)
        defaultBladeVisualDbShouldBeFound("updateUser.lessThan=" + (DEFAULT_UPDATE_USER + 1));
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByUpdateUserIsGreaterThanSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where updateUser is greater than DEFAULT_UPDATE_USER
        defaultBladeVisualDbShouldNotBeFound("updateUser.greaterThan=" + DEFAULT_UPDATE_USER);

        // Get all the bladeVisualDbList where updateUser is greater than SMALLER_UPDATE_USER
        defaultBladeVisualDbShouldBeFound("updateUser.greaterThan=" + SMALLER_UPDATE_USER);
    }


    @Test
    @Transactional
    public void getAllBladeVisualDbsByCreateUserIsEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where createUser equals to DEFAULT_CREATE_USER
        defaultBladeVisualDbShouldBeFound("createUser.equals=" + DEFAULT_CREATE_USER);

        // Get all the bladeVisualDbList where createUser equals to UPDATED_CREATE_USER
        defaultBladeVisualDbShouldNotBeFound("createUser.equals=" + UPDATED_CREATE_USER);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByCreateUserIsNotEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where createUser not equals to DEFAULT_CREATE_USER
        defaultBladeVisualDbShouldNotBeFound("createUser.notEquals=" + DEFAULT_CREATE_USER);

        // Get all the bladeVisualDbList where createUser not equals to UPDATED_CREATE_USER
        defaultBladeVisualDbShouldBeFound("createUser.notEquals=" + UPDATED_CREATE_USER);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByCreateUserIsInShouldWork() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where createUser in DEFAULT_CREATE_USER or UPDATED_CREATE_USER
        defaultBladeVisualDbShouldBeFound("createUser.in=" + DEFAULT_CREATE_USER + "," + UPDATED_CREATE_USER);

        // Get all the bladeVisualDbList where createUser equals to UPDATED_CREATE_USER
        defaultBladeVisualDbShouldNotBeFound("createUser.in=" + UPDATED_CREATE_USER);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByCreateUserIsNullOrNotNull() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where createUser is not null
        defaultBladeVisualDbShouldBeFound("createUser.specified=true");

        // Get all the bladeVisualDbList where createUser is null
        defaultBladeVisualDbShouldNotBeFound("createUser.specified=false");
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByCreateUserIsGreaterThanOrEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where createUser is greater than or equal to DEFAULT_CREATE_USER
        defaultBladeVisualDbShouldBeFound("createUser.greaterThanOrEqual=" + DEFAULT_CREATE_USER);

        // Get all the bladeVisualDbList where createUser is greater than or equal to (DEFAULT_CREATE_USER + 1)
        defaultBladeVisualDbShouldNotBeFound("createUser.greaterThanOrEqual=" + (DEFAULT_CREATE_USER + 1));
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByCreateUserIsLessThanOrEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where createUser is less than or equal to DEFAULT_CREATE_USER
        defaultBladeVisualDbShouldBeFound("createUser.lessThanOrEqual=" + DEFAULT_CREATE_USER);

        // Get all the bladeVisualDbList where createUser is less than or equal to SMALLER_CREATE_USER
        defaultBladeVisualDbShouldNotBeFound("createUser.lessThanOrEqual=" + SMALLER_CREATE_USER);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByCreateUserIsLessThanSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where createUser is less than DEFAULT_CREATE_USER
        defaultBladeVisualDbShouldNotBeFound("createUser.lessThan=" + DEFAULT_CREATE_USER);

        // Get all the bladeVisualDbList where createUser is less than (DEFAULT_CREATE_USER + 1)
        defaultBladeVisualDbShouldBeFound("createUser.lessThan=" + (DEFAULT_CREATE_USER + 1));
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByCreateUserIsGreaterThanSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where createUser is greater than DEFAULT_CREATE_USER
        defaultBladeVisualDbShouldNotBeFound("createUser.greaterThan=" + DEFAULT_CREATE_USER);

        // Get all the bladeVisualDbList where createUser is greater than SMALLER_CREATE_USER
        defaultBladeVisualDbShouldBeFound("createUser.greaterThan=" + SMALLER_CREATE_USER);
    }


    @Test
    @Transactional
    public void getAllBladeVisualDbsByUpdateTimeIsEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where updateTime equals to DEFAULT_UPDATE_TIME
        defaultBladeVisualDbShouldBeFound("updateTime.equals=" + DEFAULT_UPDATE_TIME);

        // Get all the bladeVisualDbList where updateTime equals to UPDATED_UPDATE_TIME
        defaultBladeVisualDbShouldNotBeFound("updateTime.equals=" + UPDATED_UPDATE_TIME);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByUpdateTimeIsNotEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where updateTime not equals to DEFAULT_UPDATE_TIME
        defaultBladeVisualDbShouldNotBeFound("updateTime.notEquals=" + DEFAULT_UPDATE_TIME);

        // Get all the bladeVisualDbList where updateTime not equals to UPDATED_UPDATE_TIME
        defaultBladeVisualDbShouldBeFound("updateTime.notEquals=" + UPDATED_UPDATE_TIME);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByUpdateTimeIsInShouldWork() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where updateTime in DEFAULT_UPDATE_TIME or UPDATED_UPDATE_TIME
        defaultBladeVisualDbShouldBeFound("updateTime.in=" + DEFAULT_UPDATE_TIME + "," + UPDATED_UPDATE_TIME);

        // Get all the bladeVisualDbList where updateTime equals to UPDATED_UPDATE_TIME
        defaultBladeVisualDbShouldNotBeFound("updateTime.in=" + UPDATED_UPDATE_TIME);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByUpdateTimeIsNullOrNotNull() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where updateTime is not null
        defaultBladeVisualDbShouldBeFound("updateTime.specified=true");

        // Get all the bladeVisualDbList where updateTime is null
        defaultBladeVisualDbShouldNotBeFound("updateTime.specified=false");
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByStatusIsEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where status equals to DEFAULT_STATUS
        defaultBladeVisualDbShouldBeFound("status.equals=" + DEFAULT_STATUS);

        // Get all the bladeVisualDbList where status equals to UPDATED_STATUS
        defaultBladeVisualDbShouldNotBeFound("status.equals=" + UPDATED_STATUS);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByStatusIsNotEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where status not equals to DEFAULT_STATUS
        defaultBladeVisualDbShouldNotBeFound("status.notEquals=" + DEFAULT_STATUS);

        // Get all the bladeVisualDbList where status not equals to UPDATED_STATUS
        defaultBladeVisualDbShouldBeFound("status.notEquals=" + UPDATED_STATUS);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByStatusIsInShouldWork() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where status in DEFAULT_STATUS or UPDATED_STATUS
        defaultBladeVisualDbShouldBeFound("status.in=" + DEFAULT_STATUS + "," + UPDATED_STATUS);

        // Get all the bladeVisualDbList where status equals to UPDATED_STATUS
        defaultBladeVisualDbShouldNotBeFound("status.in=" + UPDATED_STATUS);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByStatusIsNullOrNotNull() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where status is not null
        defaultBladeVisualDbShouldBeFound("status.specified=true");

        // Get all the bladeVisualDbList where status is null
        defaultBladeVisualDbShouldNotBeFound("status.specified=false");
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByStatusIsGreaterThanOrEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where status is greater than or equal to DEFAULT_STATUS
        defaultBladeVisualDbShouldBeFound("status.greaterThanOrEqual=" + DEFAULT_STATUS);

        // Get all the bladeVisualDbList where status is greater than or equal to (DEFAULT_STATUS + 1)
        defaultBladeVisualDbShouldNotBeFound("status.greaterThanOrEqual=" + (DEFAULT_STATUS + 1));
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByStatusIsLessThanOrEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where status is less than or equal to DEFAULT_STATUS
        defaultBladeVisualDbShouldBeFound("status.lessThanOrEqual=" + DEFAULT_STATUS);

        // Get all the bladeVisualDbList where status is less than or equal to SMALLER_STATUS
        defaultBladeVisualDbShouldNotBeFound("status.lessThanOrEqual=" + SMALLER_STATUS);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByStatusIsLessThanSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where status is less than DEFAULT_STATUS
        defaultBladeVisualDbShouldNotBeFound("status.lessThan=" + DEFAULT_STATUS);

        // Get all the bladeVisualDbList where status is less than (DEFAULT_STATUS + 1)
        defaultBladeVisualDbShouldBeFound("status.lessThan=" + (DEFAULT_STATUS + 1));
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByStatusIsGreaterThanSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where status is greater than DEFAULT_STATUS
        defaultBladeVisualDbShouldNotBeFound("status.greaterThan=" + DEFAULT_STATUS);

        // Get all the bladeVisualDbList where status is greater than SMALLER_STATUS
        defaultBladeVisualDbShouldBeFound("status.greaterThan=" + SMALLER_STATUS);
    }


    @Test
    @Transactional
    public void getAllBladeVisualDbsByIsDeletedIsEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where isDeleted equals to DEFAULT_IS_DELETED
        defaultBladeVisualDbShouldBeFound("isDeleted.equals=" + DEFAULT_IS_DELETED);

        // Get all the bladeVisualDbList where isDeleted equals to UPDATED_IS_DELETED
        defaultBladeVisualDbShouldNotBeFound("isDeleted.equals=" + UPDATED_IS_DELETED);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByIsDeletedIsNotEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where isDeleted not equals to DEFAULT_IS_DELETED
        defaultBladeVisualDbShouldNotBeFound("isDeleted.notEquals=" + DEFAULT_IS_DELETED);

        // Get all the bladeVisualDbList where isDeleted not equals to UPDATED_IS_DELETED
        defaultBladeVisualDbShouldBeFound("isDeleted.notEquals=" + UPDATED_IS_DELETED);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByIsDeletedIsInShouldWork() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where isDeleted in DEFAULT_IS_DELETED or UPDATED_IS_DELETED
        defaultBladeVisualDbShouldBeFound("isDeleted.in=" + DEFAULT_IS_DELETED + "," + UPDATED_IS_DELETED);

        // Get all the bladeVisualDbList where isDeleted equals to UPDATED_IS_DELETED
        defaultBladeVisualDbShouldNotBeFound("isDeleted.in=" + UPDATED_IS_DELETED);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByIsDeletedIsNullOrNotNull() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where isDeleted is not null
        defaultBladeVisualDbShouldBeFound("isDeleted.specified=true");

        // Get all the bladeVisualDbList where isDeleted is null
        defaultBladeVisualDbShouldNotBeFound("isDeleted.specified=false");
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByIsDeletedIsGreaterThanOrEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where isDeleted is greater than or equal to DEFAULT_IS_DELETED
        defaultBladeVisualDbShouldBeFound("isDeleted.greaterThanOrEqual=" + DEFAULT_IS_DELETED);

        // Get all the bladeVisualDbList where isDeleted is greater than or equal to (DEFAULT_IS_DELETED + 1)
        defaultBladeVisualDbShouldNotBeFound("isDeleted.greaterThanOrEqual=" + (DEFAULT_IS_DELETED + 1));
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByIsDeletedIsLessThanOrEqualToSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where isDeleted is less than or equal to DEFAULT_IS_DELETED
        defaultBladeVisualDbShouldBeFound("isDeleted.lessThanOrEqual=" + DEFAULT_IS_DELETED);

        // Get all the bladeVisualDbList where isDeleted is less than or equal to SMALLER_IS_DELETED
        defaultBladeVisualDbShouldNotBeFound("isDeleted.lessThanOrEqual=" + SMALLER_IS_DELETED);
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByIsDeletedIsLessThanSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where isDeleted is less than DEFAULT_IS_DELETED
        defaultBladeVisualDbShouldNotBeFound("isDeleted.lessThan=" + DEFAULT_IS_DELETED);

        // Get all the bladeVisualDbList where isDeleted is less than (DEFAULT_IS_DELETED + 1)
        defaultBladeVisualDbShouldBeFound("isDeleted.lessThan=" + (DEFAULT_IS_DELETED + 1));
    }

    @Test
    @Transactional
    public void getAllBladeVisualDbsByIsDeletedIsGreaterThanSomething() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        // Get all the bladeVisualDbList where isDeleted is greater than DEFAULT_IS_DELETED
        defaultBladeVisualDbShouldNotBeFound("isDeleted.greaterThan=" + DEFAULT_IS_DELETED);

        // Get all the bladeVisualDbList where isDeleted is greater than SMALLER_IS_DELETED
        defaultBladeVisualDbShouldBeFound("isDeleted.greaterThan=" + SMALLER_IS_DELETED);
    }

    /**
     * Executes the search, and checks that the default entity is returned.
     */
    private void defaultBladeVisualDbShouldBeFound(String filter) throws Exception {
        restBladeVisualDbMockMvc.perform(get("/api/blade-visual-dbs?sort=id,desc&" + filter))
                .andExpect(status().isOk())
                .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))
                .andExpect(jsonPath("$.[*].id").value(hasItem(bladeVisualDb.getId().intValue())))
                .andExpect(jsonPath("$.[*].name").value(hasItem(DEFAULT_NAME)))
                .andExpect(jsonPath("$.[*].createDept").value(hasItem(DEFAULT_CREATE_DEPT.intValue())))
                .andExpect(jsonPath("$.[*].password").value(hasItem(DEFAULT_PASSWORD)))
                .andExpect(jsonPath("$.[*].url").value(hasItem(DEFAULT_URL)))
                .andExpect(jsonPath("$.[*].driverClass").value(hasItem(DEFAULT_DRIVER_CLASS)))
                .andExpect(jsonPath("$.[*].username").value(hasItem(DEFAULT_USERNAME)))
                .andExpect(jsonPath("$.[*].createTime").value(hasItem(DEFAULT_CREATE_TIME.toString())))
                .andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK)))
                .andExpect(jsonPath("$.[*].updateUser").value(hasItem(DEFAULT_UPDATE_USER.intValue())))
                .andExpect(jsonPath("$.[*].createUser").value(hasItem(DEFAULT_CREATE_USER.intValue())))
                .andExpect(jsonPath("$.[*].updateTime").value(hasItem(DEFAULT_UPDATE_TIME.toString())))
                .andExpect(jsonPath("$.[*].status").value(hasItem(DEFAULT_STATUS)))
                .andExpect(jsonPath("$.[*].isDeleted").value(hasItem(DEFAULT_IS_DELETED)));

        // Check, that the count call also returns 1
        restBladeVisualDbMockMvc.perform(get("/api/blade-visual-dbs/count?sort=id,desc&" + filter))
                .andExpect(status().isOk())
                .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))
                .andExpect(content().string("1"));
    }

    /**
     * Executes the search, and checks that the default entity is not returned.
     */
    private void defaultBladeVisualDbShouldNotBeFound(String filter) throws Exception {
        restBladeVisualDbMockMvc.perform(get("/api/blade-visual-dbs?sort=id,desc&" + filter))
                .andExpect(status().isOk())
                .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))
                .andExpect(jsonPath("$").isArray())
                .andExpect(jsonPath("$").isEmpty());

        // Check, that the count call also returns 0
        restBladeVisualDbMockMvc.perform(get("/api/blade-visual-dbs/count?sort=id,desc&" + filter))
                .andExpect(status().isOk())
                .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))
                .andExpect(content().string("0"));
    }

    @Test
    @Transactional
    public void getNonExistingBladeVisualDb() throws Exception {
        // Get the bladeVisualDb
        restBladeVisualDbMockMvc.perform(get("/api/blade-visual-dbs/{id}", Long.MAX_VALUE))
                .andExpect(status().isNotFound());
    }

    @Test
    @Transactional
    public void updateBladeVisualDb() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        int databaseSizeBeforeUpdate = bladeVisualDbRepository.findAll().size();

        // Update the bladeVisualDb
        BladeVisualDb updatedBladeVisualDb = bladeVisualDbRepository.findById(bladeVisualDb.getId()).get();
        // Disconnect from session so that the updates on updatedBladeVisualDb are not directly saved in db
        em.detach(updatedBladeVisualDb);
        updatedBladeVisualDb
                .name(UPDATED_NAME)
                .createDept(UPDATED_CREATE_DEPT)
                .password(UPDATED_PASSWORD)
                .url(UPDATED_URL)
                .driverClass(UPDATED_DRIVER_CLASS)
                .username(UPDATED_USERNAME)
                .createTime(UPDATED_CREATE_TIME)
                .remark(UPDATED_REMARK)
                .updateUser(UPDATED_UPDATE_USER)
                .createUser(UPDATED_CREATE_USER)
                .updateTime(UPDATED_UPDATE_TIME)
                .status(UPDATED_STATUS)
                .isDeleted(UPDATED_IS_DELETED);
        BladeVisualDbDTO bladeVisualDbDTO = bladeVisualDbMapper.toDto(updatedBladeVisualDb);

        restBladeVisualDbMockMvc.perform(put("/api/blade-visual-dbs").with(csrf())
                .contentType(MediaType.APPLICATION_JSON)
                .content(TestUtil.convertObjectToJsonBytes(bladeVisualDbDTO)))
                .andExpect(status().isOk());

        // Validate the BladeVisualDb in the database
        List<BladeVisualDb> bladeVisualDbList = bladeVisualDbRepository.findAll();
        assertThat(bladeVisualDbList).hasSize(databaseSizeBeforeUpdate);
        BladeVisualDb testBladeVisualDb = bladeVisualDbList.get(bladeVisualDbList.size() - 1);
        assertThat(testBladeVisualDb.getName()).isEqualTo(UPDATED_NAME);
        assertThat(testBladeVisualDb.getCreateDept()).isEqualTo(UPDATED_CREATE_DEPT);
        assertThat(testBladeVisualDb.getPassword()).isEqualTo(UPDATED_PASSWORD);
        assertThat(testBladeVisualDb.getUrl()).isEqualTo(UPDATED_URL);
        assertThat(testBladeVisualDb.getDriverClass()).isEqualTo(UPDATED_DRIVER_CLASS);
        assertThat(testBladeVisualDb.getUsername()).isEqualTo(UPDATED_USERNAME);
        assertThat(testBladeVisualDb.getCreateTime()).isEqualTo(UPDATED_CREATE_TIME);
        assertThat(testBladeVisualDb.getRemark()).isEqualTo(UPDATED_REMARK);
        assertThat(testBladeVisualDb.getUpdateUser()).isEqualTo(UPDATED_UPDATE_USER);
        assertThat(testBladeVisualDb.getCreateUser()).isEqualTo(UPDATED_CREATE_USER);
        assertThat(testBladeVisualDb.getUpdateTime()).isEqualTo(UPDATED_UPDATE_TIME);
        assertThat(testBladeVisualDb.getStatus()).isEqualTo(UPDATED_STATUS);
        assertThat(testBladeVisualDb.getIsDeleted()).isEqualTo(UPDATED_IS_DELETED);
    }

    @Test
    @Transactional
    public void updateNonExistingBladeVisualDb() throws Exception {
        int databaseSizeBeforeUpdate = bladeVisualDbRepository.findAll().size();

        // Create the BladeVisualDb
        BladeVisualDbDTO bladeVisualDbDTO = bladeVisualDbMapper.toDto(bladeVisualDb);

        // If the entity doesn't have an ID, it will throw BadRequestAlertException
        restBladeVisualDbMockMvc.perform(put("/api/blade-visual-dbs").with(csrf())
                .contentType(MediaType.APPLICATION_JSON)
                .content(TestUtil.convertObjectToJsonBytes(bladeVisualDbDTO)))
                .andExpect(status().isBadRequest());

        // Validate the BladeVisualDb in the database
        List<BladeVisualDb> bladeVisualDbList = bladeVisualDbRepository.findAll();
        assertThat(bladeVisualDbList).hasSize(databaseSizeBeforeUpdate);
    }

    @Test
    @Transactional
    public void deleteBladeVisualDb() throws Exception {
        // Initialize the database
        bladeVisualDbRepository.saveAndFlush(bladeVisualDb);

        int databaseSizeBeforeDelete = bladeVisualDbRepository.findAll().size();

        // Delete the bladeVisualDb
        restBladeVisualDbMockMvc.perform(delete("/api/blade-visual-dbs/{id}", bladeVisualDb.getId()).with(csrf())
                .accept(MediaType.APPLICATION_JSON))
                .andExpect(status().isNoContent());

        // Validate the database contains one less item
        List<BladeVisualDb> bladeVisualDbList = bladeVisualDbRepository.findAll();
        assertThat(bladeVisualDbList).hasSize(databaseSizeBeforeDelete - 1);
    }
}
